package cn.jboa.action;

import cn.jboa.entity.SysEmployee;
import cn.jboa.service.EmployeeService;
import com.opensymphony.xwork2.Action;
import org.springframework.beans.factory.annotation.Autowired;

public class EmployeeAction implements Action {
    @Autowired
    private EmployeeService employeeService;
    private SysEmployee employee;
    @Override
    public String execute() throws Exception {
        employee = employeeService.Login(employee);
        if(employee != null && employee.getName() != null){
            return SUCCESS;
        }
        return INPUT;
    }


    public SysEmployee getEmployee() {
        return employee;
    }

    public void setEmployee(SysEmployee employee) {
        this.employee = employee;
    }
}
